package thread.threaddemo;

/**
 * @Author: wenjingyuan
 * @Date: 2022/11/02/19:09
 * @Description:用Runnable创建线程并设置线程名称
 */
public class ThreadDemo11 {
    public static void main(String[] args) {
        Thread thread=new Thread(new Runnable() {
            @Override
            public void run() {
                //休眠
                try {
                    Thread.sleep(60*60*1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        },"Runnable-Thread");
        thread.start();
    }
}
